package so.sao.shop.supplier.pojo.input;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;


/**
 * <p>
 * 收货地址实体
 * </p>
 *
 * @author zhangruibing
 * @since 2017-07-17
 */
public class AppDeliveryAddressInput {


    /**
     * 收货地址id
     */
	private Long addrId;

    /**
     * 收货人
     */
    @NotBlank(message = "收货人不能为空")
	@Size(max = 30,message = "收货人姓名不能超过30个字")
	private String consignee;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话不能为空")
	@Pattern(regexp = "^1[0-9]{10}$",message = "请输入合法的手机号码")
	private String consigneePhone;

    /**
     * 省
     */
	@NotBlank(message = "地址省不能为空")
	private String addrProvince;

	/**
	 * 省级编码
	 */
	@NotBlank(message = "省级编码不能为空")
	private String addrProvinceCode;

    /**
     * 市
     */
	@NotBlank(message = "地址市不能为空")
	private String addrCity;

	/**
	 * 市级编码
	 */
	@NotBlank(message = "市级编码不能为空")
	private String addrCityCode;

    /**
     * 区
     */
	@NotBlank(message = "地址区不能为空")
	private String addrArea;

	/**
	 * 区级编码
	 */
	@NotBlank(message = "区级编码不能为空")
	private String addrAreaCode;

    /**
     * 详细地址
     */
	@NotBlank(message = "详细地址不能为空")
	@Size(max = 100 , message = "字数不能超过100!")
	private String addrDetails;

    /**
     * 是否设为默认地址(0：非默认地址；1：默认地址)
     */
	@NotNull(message = "默认地址不能为空")
	private Integer addrDefault;

    /**
     * 用户id
     */
	private Long userId;

	/**
	 * 邮政编码
	 */
	private String zipCode;

	public Long getAddrId() {
		return addrId;
	}

	public void setAddrId(Long addrId) {
		this.addrId = addrId;
	}

	public String getConsignee() {
		return consignee;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}

	public String getConsigneePhone() {
		return consigneePhone;
	}

	public void setConsigneePhone(String consigneePhone) {
		this.consigneePhone = consigneePhone;
	}

	public String getAddrProvince() {
		return addrProvince;
	}

	public void setAddrProvince(String addrProvince) {
		this.addrProvince = addrProvince;
	}

	public String getAddrProvinceCode() {
		return addrProvinceCode;
	}

	public void setAddrProvinceCode(String addrProvinceCode) {
		this.addrProvinceCode = addrProvinceCode;
	}

	public String getAddrCity() {
		return addrCity;
	}

	public void setAddrCity(String addrCity) {
		this.addrCity = addrCity;
	}

	public String getAddrCityCode() {
		return addrCityCode;
	}

	public void setAddrCityCode(String addrCityCode) {
		this.addrCityCode = addrCityCode;
	}

	public String getAddrArea() {
		return addrArea;
	}

	public void setAddrArea(String addrArea) {
		this.addrArea = addrArea;
	}

	public String getAddrAreaCode() {
		return addrAreaCode;
	}

	public void setAddrAreaCode(String addrAreaCode) {
		this.addrAreaCode = addrAreaCode;
	}

	public String getAddrDetails() {
		return addrDetails;
	}

	public void setAddrDetails(String addrDetails) {
		this.addrDetails = addrDetails;
	}

	public Integer getAddrDefault() {
		return addrDefault;
	}

	public void setAddrDefault(Integer addrDefault) {
		this.addrDefault = addrDefault;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	@Override
	public String toString() {
		return "AppDeliveryAddressInput{" +
				"addrId=" + addrId +
				", consignee='" + consignee + '\'' +
				", consigneePhone='" + consigneePhone + '\'' +
				", addrProvince='" + addrProvince + '\'' +
				", addrProvinceCode='" + addrProvinceCode + '\'' +
				", addrCity='" + addrCity + '\'' +
				", addrCityCode='" + addrCityCode + '\'' +
				", addrArea='" + addrArea + '\'' +
				", addrAreaCode='" + addrAreaCode + '\'' +
				", addrDetails='" + addrDetails + '\'' +
				", addrDefault=" + addrDefault +
				", userId=" + userId +
				", zipCode='" + zipCode + '\'' +
				'}';
	}
}
